package com.njtoyo.taxi.admin.library.traffic_info;

import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

@Data
@Accessors(chain = true)
public class Param {
    private String sid;
    private List<Condition> condition;

    public Param(String sid, List<Condition> condition) {
        this.sid = sid;
        this.condition = condition;
    }

    public Param(String sid, Conditions conditions) {
        this.sid = sid;
        this.condition = conditions.getCondition();
    }

    @Data
    @Accessors(chain = true)
    public static class Condition {
        private String dataCode;
        private String dataValue;
        private String operation = "eq";

        public Condition(String code, String value) {
            this.dataCode = code;
            this.dataValue = value;
        }
    }
}
